package com.agricultural.command;

import com.agricultural.equipment.AgriculturalEquipment;

public class StopCommand implements Command {
    private AgriculturalEquipment equipment;

    public StopCommand(AgriculturalEquipment equipment) {
        this.equipment = equipment;
    }

    @Override
    public void execute() {
        System.out.println("执行停止命令: " + equipment.getEquipmentId());
        equipment.stop();
    }

    @Override
    public void undo() {
        System.out.println("撤销停止命令: " + equipment.getEquipmentId());
        equipment.start();
    }

    @Override
    public String getDescription() {
        return "停止设备: " + equipment.getEquipmentId();
    }
}    